#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
char f[1000], tmp[26];
int main()
{
    char (*p)[26], (*q)[26];
    int i, j, num, s;
    while(gets(f) != NULL)
    {
        p=q=(char(*)[26])calloc(20, sizeof(char [26]));
        i=j=num=s=0;
        while(f[i] != '\0')
        {
            if(f[i] != ' ')
            {
                s = 1;
                tmp[j++] = f[i];
            }
            else
            {
                tmp[j] = '\0';
                j = 0;
                if(s==1)
                {
                    if(num>20*0.8) p=q=realloc(p, (num+num*0.5)*sizeof(char [26]));
                    strcpy(p[num], tmp);
                    num++;
                }
                s = 0;
            }
            i++;
        }
        if(f[i-1] != ' ')
        {
            tmp[j] = '\0';
            if(num>20*0.8) p=q=realloc(p, (num+num*0.5)*sizeof(char [26]));
            strcpy(p[num], tmp);
            num++;
        }
        printf("%d\n", num);
        for(i=0; i<num; i++)
            printf("%s\n", q[i]);
    }
    return 0;
}